// MFCTextEffectView.cpp : implementation of the CMFCTextEffectView class
//

#include "stdafx.h"
#include "MFCTextEffect.h"

#include "MFCTextEffectDoc.h"
#include "MFCTextEffectView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CMFCTextEffectView

IMPLEMENT_DYNCREATE(CMFCTextEffectView, CAvalonView)

BEGIN_MESSAGE_MAP(CMFCTextEffectView, CAvalonView)
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, &CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, &CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, &CView::OnFilePrintPreview)
END_MESSAGE_MAP()




// CMFCTextEffectView construction/destruction

CMFCTextEffectView::CMFCTextEffectView():CAvalonView(WPFtextEffect::UserControl1::typeid)  
{
	// TODO: add construction code here

}
void CMFCTextEffectView::SurClickAvalon(System::Object ^sender,System::Windows::RoutedEventArgs  ^ e )  
{
	AfxMessageBox (L"Click bouton Avalon execution code MFC");
}
void CMFCTextEffectView::OnInitialUpdate()
{
	((WPFtextEffect::UserControl1^)(GetControl()))->Click+=MAKE_DELEGATE (System::Windows::RoutedEventHandler,SurClickAvalon);

}
CMFCTextEffectView::~CMFCTextEffectView()
{
}




BOOL CMFCTextEffectView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CView::PreCreateWindow(cs);
}

// CMFCTextEffectView drawing

void CMFCTextEffectView::OnDraw(CDC* /*pDC*/)
{
	CMFCTextEffectDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	if (!pDoc)
		return;

	// TODO: add draw code for native data here
}


// CMFCTextEffectView printing

BOOL CMFCTextEffectView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}

void CMFCTextEffectView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void CMFCTextEffectView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}


// CMFCTextEffectView diagnostics

#ifdef _DEBUG
void CMFCTextEffectView::AssertValid() const
{
	CView::AssertValid();
}

void CMFCTextEffectView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

CMFCTextEffectDoc* CMFCTextEffectView::GetDocument() const // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMFCTextEffectDoc)));
	return (CMFCTextEffectDoc*)m_pDocument;
}
#endif //_DEBUG


// CMFCTextEffectView message handlers
